'use strict';

const Controller = require('egg').Controller;

class DetailController extends Controller {
  async index() {
    const { ctx } = this;
    var {id} = ctx.query;
    console.log(id)
    var data = await ctx.service.top250.findDetail(id)
    await ctx.render('detail.html', { res:data[0] })
    /* ctx.body = {
      code:200,
      res:data.data,
      msg:"success  电影详情"
  } */
  }
}

module.exports = DetailController;
